<%@ page contentType="text/html;charset=UTF-8" language="java" %><html>
<%@ page isELIgnored="false" %>
<head>
    <title>首页</title>
</head>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<body>
    <form>
        <input id ="name" type="text" name="name">
    </form>
    <script>
        $(function () {
            alert("进入页面执行");
        });

        $("#name").blur(function () {
            var name = $("#name").val();
            $.ajax({
                url: "user",
                type: "GET",
                dataType: "json",
                data: {
                    name: name,
                    createTime: "2024-09-04 12:00:00"
                },
                success: function (data) {
                    alert(data.name +":" + data.createTime);
                    $("#name").val(data.createTime);
                }
            });
        });
    </script>
</body>
</html>
